<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>float左中右布局，中间自适应</title>

    <style>
        body,
        html {
            margin: 0;
            padding: 0;
            height: 100%;
        }

        .box {
            text-align: center;
            width: 100%;
            height: 100%;
        }

        .left, .middle, .right {
            height: 100%;
        }

        .left {
            background-color: aquamarine;
            width: 220px;
            float: left;
        }

        .middle {
            background-color: bisque;
            /* 触发BFC：防止与浮动盒子重叠 */
            overflow: hidden;
        }

        .right {
            background-color: chocolate;
            width: 200px;
            float: right;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="left">left</div>
        <div class="right">right</div>
        <div class="middle">middle</div>
    </div>

</body>

</html>